package day0728;

public class Test1 {
    public static void main(String[] args) {
        double[] ds={1.2,   5.6   , 8.1    , 9.6};
        print(ds);

        print(1.2,   5.6   , 8.1    , 9.6);
    }

    //以可变参数的方式传入多个数，然后用for循环打印。
    static void print(double ...  nums){
       for (int i = 0; i < nums.length; i++) {
           System.out.println(nums[i]);
       }
    }


}
